package itheima.jdk8_instant;

import java.time.Instant;

public class Test {
    public static void main(String[] args) {

//1.获取当前时间
            Instant instant = Instant.now();
//2.获取总秒数
            long second = instant.getEpochSecond();
            System.out.println("秒:"+ second);
//3.总纳秒数（不足一秒的纳秒数）
            int nano = instant.getNano();
            System.out.println("纳秒:"+ nano);
//4.加/减/判断时间
//5.使用场景

        }
}
